/*
 * LiquidBounce Hacked Client
 * A free open source mixin-based injection hacked client for Minecraft using Minecraft Forge.
 * https://github.com/CCBlueX/LiquidBounce/
 */
package net.ccbluex.liquidbounce.features.module.modules.exploit

import net.ccbluex.liquidbounce.event.EventTarget
import net.ccbluex.liquidbounce.event.UpdateEvent
import net.ccbluex.liquidbounce.features.module.Module
import net.ccbluex.liquidbounce.features.module.ModuleCategory
import net.ccbluex.liquidbounce.features.module.ModuleInfo
import net.minecraft.network.play.client.C03PacketPlayer
import java.util.*

@ModuleInfo(name = "Paralyze", description = "Lags the game of players standing inside of you.", category = ModuleCategory.EXPLOIT)
class Paralyze : Module() {
    @EventTarget
    fun onUpdate(event: UpdateEvent) {
        if (mc.theWorld.getEntitiesWithinAABBExcludingEntity(mc.thePlayer, mc.thePlayer.entityBoundingBox).isNotEmpty())
            for (i in 0..999)
                mc.netHandler.addToSendQueue(C03PacketPlayer(Random().nextBoolean()))
    }
}
